from django.contrib import admin
from fontrender.converter.models import Tag, Category, Font

class CategoryAdmin(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('name',)}

class FontAdmin(admin.ModelAdmin):
    filter_horizontal = ('tags',)
    search_fields = ('name',)
    list_filter = ('created',)
    prepopulated_fields = {'slug': ('name',)}

admin.site.register(Tag)
admin.site.register(Category, CategoryAdmin)
admin.site.register(Font, FontAdmin)
